import request from "@/utils/request";

export const add = (params) => {
  const { name, idCard, type } = params;
  return request.post("/member/passenger/add", {
    name,
    idCard,
    type,
  });
};

export const getPage = (pageNo, pageSize) => {
  return request.post("/member/passenger/page", {
    pageNo,
    pageSize,
  });
};

export const remove = (id) => {
  return request.delete(`/member/passenger/remove/${id}`);
};

export const edit = (params) => {
  const { id, name, idCard, type } = params;
  return request.post("/member/passenger/edit", {
    id,
    name,
    idCard,
    type,
  });
};

export const list = () => {
  return request.get("/member/passenger/list");
};